import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'

import { is } from 'bpmn-js/lib/util/ModelUtil'

export default function (group, element) {
  // Only return an entry, if the currently selected
  // element is a start event.
  // 可动态配置的数组
  const selectOptions = [
    { value: 'test1', name: 'test1' },
    { value: 'test2', name: 'test2' },
    { value: 'test3', name: 'test3' }
  ]
  if (is(element, 'bpmn:BusinessRuleTask')) {
    group.entries.push(entryFactory.selectBox({
      id: 'spell',
      selectOptions: selectOptions,
      modelProperty: 'spell',
      label: '选择'
      // description: 'Apply a black magic spell',
      // emptyParameter: true, // 初始化是否选中元素,当前默认选中第一个
    }))
  }
}
